package com.linyf.design.prototype.deep;


import java.util.ArrayList;

/**
 * @Author: linyf
 * @Description: TODO
 * @DateTime: 2023/3/31 10:43
 **/
public class DeepCopy implements Cloneable{

    private ArrayList<String> array = new ArrayList<>();


    @Override
    protected DeepCopy clone() throws CloneNotSupportedException {
        DeepCopy deepCopy = (DeepCopy) super.clone();

        deepCopy.setArray((ArrayList<String>) this.array.clone());

        return deepCopy;
    }


    public ArrayList<String> getArray() {
        return array;
    }

    public void setArray(ArrayList<String> array) {
        this.array = array;
    }
}
